/*
 * The RavenX Library
 * Copyright (c) 2008 by Solidus
 * 
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.It is provided "as is" without express 
 * or implied warranty.
 *
 */

#ifndef RX_QUEUE_H
#define RX_QUEUE_H

#include "rx_typedef.h"

RX_SPACE_BEG




typedef struct __rx_queue_tag rx_queue_t;


RavenAPI rx_queue_t* rx_queue_create(const rx_info_t *info, const rx_alloc_t *palloc);

RavenAPI void rx_queue_destroy(rx_queue_t *self);


RavenAPI void* rx_queue_front(rx_queue_t *self);

RavenAPI void* rx_queue_back(rx_queue_t *self);


RavenAPI void  rx_queue_push(rx_queue_t *self, const void *data);

RavenAPI void  rx_queue_pop(rx_queue_t *self);

RavenAPI size_t rx_queue_size(const rx_queue_t *self);

RavenAPI rx_bool rx_queue_is_empty(const rx_queue_t *self);




typedef struct __rx_prio_queue_tag rx_prio_queue_t;

RavenAPI rx_prio_queue_t* rx_prio_queue_create(const rx_info_t *info, const rx_alloc_t *palloc);

RavenAPI void rx_prio_queue_destroy(rx_prio_queue_t* self);

RavenAPI void  rx_prio_queue_push(rx_prio_queue_t *self, const void *data);

RavenAPI void  rx_prio_queue_pop(rx_prio_queue_t *self);

RavenAPI const void* rx_prio_queue_top(const rx_prio_queue_t *self);

RavenAPI size_t rx_prio_queue_size(const rx_prio_queue_t *self);

RavenAPI rx_bool rx_prio_queue_is_empty(const rx_prio_queue_t *self);







RX_SPACE_END




#endif